package com.wxy.common.exception;

/**
 * 业务异常
 *
 * @author WangXueYang
 * @since 2023-01-07
 */
public class BusinessException extends RuntimeException {
    /**
     * 错误编码
     */
    private String code;

    public BusinessException() {
        super();
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(String errorCode, String message) {
        super(message);
        this.code = errorCode;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    /**
     * getCode
     *
     * @return code
     */
    public String getCode() {
        return this.code;
    }
}
